package etnor.security;

import java.io.IOException;
import java.net.InetAddress;

import static com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat.IP_ADDRESS;

public class TestDefind {
    public static void main(String[] args) {
        int j=0;
        for(int i=0;i<999999;i++) {
            try {
                InetAddress inetAddress = InetAddress.getByName("64.31.3.89");
                boolean isReachable = inetAddress.isReachable(1000); // 1秒超时
                if (isReachable) {
                    j++;
                    System.out.println("明标：" + "64.31.3.89" + " 成功"+j+"次");
                } else {
                    System.out.println("Ping to " + IP_ADDRESS + " failed.");
                }
            } catch (IOException e) {
                System.err.println("Error pinging " + IP_ADDRESS + ": " + e.getMessage());
            }

        }
    }
}
